<template>
	<view>
		<text>{{count}}</text> <text>{{dbcount}}</text>
		<button type="default" @click="onPlus">加一</button>
	</view>
</template>

<script setup>
	import { ref,computed,watch} from "vue"
	//响应式属性
	const count = ref(0)
	//计算属性
	const dbcount = computed(()=> count.value*2)
	//加一
	const onPlus = ()=>count.value++
	//侦听器
	watch(count,(value)=>console.log('count值改变',value))
	
</script>

<style>

</style>
